package com.gemme.gemme.view;

import android.content.Context;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.widget.Button;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.gemme.gemme.R;

public class AddressShowView extends RelativeLayout {
    private Context context;
    Button button1;
    public AddressShowView(Context context) {
        this(context,null);
    }

    public AddressShowView(Context context, AttributeSet attrs) {
        this(context, attrs,0);
    }

    public AddressShowView(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
        this.context = context;
        initView();
    }
    TextView tv_name; TextView tv_phone; TextView tv_address;
    private void initView() {
        LayoutInflater.from(context).inflate(R.layout.address_show_view,this);

        tv_name = findViewById(R.id.tv_name);

        tv_phone = findViewById(R.id.tv_phone);

        tv_address = findViewById(R.id.tv_address);
    }

    public AddressShowView setName(String name){
        tv_name.setText(name +"");
        return this;
    }

    public AddressShowView setPhone(String phone){
        tv_phone.setText(phone +"");
        return this;
    }

    public AddressShowView setAdddress(String address){
        tv_address.setText(address +"");
        return this;
    }

}
